<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>图片弹窗|菜鸟教程</title>
    <link rel="stylesheet" href="./index.css" />
  </head>
  <body>
    <!-- 触发弹窗 - 图片改为你的图片地址 -->
    <img
      id="myImg"
      src="../../../img/img2.jpg"
      alt="文本描述信息"
      width="300"
      height="200"
    />

    <!-- 弹窗 -->
    <div id="myModal" class="modal">
      <!-- 关闭按钮 -->

      <!-- 弹窗内容 -->
      <img class="modal-content" id="img01" />

      <!-- 文本描述 -->
      <div id="caption"></div>
    </div>
    <script src="./index.js"></script>
  </body>
</html>
